<template>
  <div class="app-container">

    <!-- 搜索工作栏 -->
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
      <el-form-item label="商户类型" prop="tenantType">
        <el-select v-model="queryParams.tenantType" placeholder="请选择商户类型" clearable size="small">
          <el-option v-for="dict in this.getDictDatas(DICT_TYPE.app_tenant_type)"
                     :key="dict.value" :label="dict.label" :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="商户名称" prop="tenantId">
        <el-select v-model="queryParams.tenantId" @change="chooseTenant" filterable clearable placeholder="请输入商户名称"
                   @keyup.enter.native="handleQuery"
        >
          <el-option v-for="tenant in tenants" :key="parseInt(tenant.id)" :label="tenant.name"
                     :value="parseInt(tenant.id)"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="分公司名称" prop="subTenantId">
        <el-select v-model="queryParams.subTenantId" @change="chooseSubTenant" filterable clearable
                   placeholder="请输入分公司名称"
                   @keyup.enter.native="handleQuery"
        >
          <el-option v-for="subTenant in subTenants" :key="parseInt(subTenant.id)" :label="subTenant.name"
                     :value="parseInt(subTenant.id)"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="门店名称" prop="shopId">
        <el-select v-model="queryParams.shopId" filterable clearable placeholder="请输入门店名称"
                   @keyup.enter.native="handleQuery"
        >
          <el-option v-for="shop in shops" :key="parseInt(shop.id)" :label="shop.name"
                     :value="parseInt(shop.id)"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="订单号" prop="reportOrderNo">
        <el-input v-model="queryParams.reportOrderNo" placeholder="请输入订单号" clearable
                  @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="订单状态" prop="reportStatus">
        <el-select v-model="queryParams.reportStatus" placeholder="请选择订单状态"
                   filterable clearable size="small"
        >
          <el-option v-for="dict in this.getDictDatas(DICT_TYPE.query_pc_report_status)"
                     :key="dict.value" :label="dict.label" :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="员工名称" prop="shopUserName">
        <el-input v-model="queryParams.shopUserName" placeholder="请输入员工名称" clearable @keyup.enter.native="handleQuery"/>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <!-- 操作工具栏 -->
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
                   :loading="exportLoading"
                   v-hasPermi="['pekingfish:app-report-order:export']"
        >导出
        </el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <!-- 列表 -->
    <el-table v-loading="loading" border :max-height="tableHeight" :data="list">
      <!--    1.文字颜色
    柔和灰（text-muted）
    主要蓝（text-primary）
    次要灰（text-secondary）
    成功绿（text-success）
    危险红（text-danger）
    警告黄（text-warning）
    危息绿（text-info）
    黑白对比（text-dark）
-->
      <el-table-column label="操作" align="center" width="100" fixed="left" class-name="small-padding fixed-width">
        <template v-slot="scope">
          <el-button v-if="scope.row.reportStatus === -1" size="mini" type="text" icon="el-icon-edit"
                     @click="handleConsent(scope.row,scope.index)"
                     v-hasPermi="['pekingfish:app-report-order:consent']"
          >同意
          </el-button>
          <el-button v-if="scope.row.reportStatus === -1" size="mini" type="text" icon="el-icon-edit"
                     @click="handleTurnDown(scope.row,scope.index)"
                     v-hasPermi="['pekingfish:app-report-order:turnDown']"
          >驳回修改
          </el-button>


          <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row,scope.index)"
                     v-hasPermi="['pekingfish:app-report-order:detail']"
          >订单详细
          </el-button>
          <el-button size="mini" type="text" icon="el-icon-view" v-if="[1,2].includes(scope.row.reportStatus)"
                     @click="appBiddingDetail(scope.row,scope.index)"
                     v-hasPermi="['pekingfish:app-report-order:detail']"
          >报价详情
          </el-button>
        </template>
      </el-table-column>
      <el-table-column label="id" align="center" v-if="false" prop="id"/>
      <el-table-column label="订单号" align="center" prop="reportOrderNo" width="150" fixed="left"/>
      <el-table-column label="订单状态" align="center" prop="reportStatus">
        <template v-slot="scope">
          <dict-tag :type="DICT_TYPE.pc_report_status" :value="scope.row.reportStatus"/>
        </template>
      </el-table-column>
      <el-table-column label="手机品牌" align="center" prop="brand"/>
      <el-table-column label="手机型号" align="center" prop="model"/>
      <el-table-column label="型号类型" align="center" prop="modelType"/>
      <el-table-column label="平台回收价" align="center" prop="reportPrice"/>
      <el-table-column label="渠道最高报价" prop="channelPrice"/>
      <el-table-column label="额外金额" prop="extraPrice"/>
      <el-table-column label="渠道用户名称" prop="channelUserName"/>
      <el-table-column label="商户类型" align="center" prop="tenantType">
        <template v-slot="scope">
          <dict-tag :type="DICT_TYPE.app_account_type" :value="scope.row.tenantType"/>
        </template>
      </el-table-column>
      <el-table-column label="员工名称" align="center" prop="shopUserName"/>
      <el-table-column label="员工等级" align="center" prop="grade">
        <template v-slot="scope">
          <dict-tag :type="DICT_TYPE.app_grade" :value="scope.row.grade"/>
        </template>
      </el-table-column>
      <el-table-column label="门店名称" align="center" :show-overflow-tooltip="true" prop="shopName"/>
      <el-table-column label="门店店长" align="center" prop="shopNameUserName"/>
      <el-table-column label="分公司名称" align="center" :show-overflow-tooltip="true" prop="subTenantName"/>
      <el-table-column label="商户名称" align="center" :show-overflow-tooltip="true" prop="tenantName"/>
      <el-table-column label="驳回原因" align="center" :show-overflow-tooltip="true" prop="reject"/>
      <el-table-column label="订单时间" align="center" prop="reportTime" width="180">
        <template v-slot="scope">
          <span>{{ parseTime(scope.row.reportTime) }}</span>
        </template>
      </el-table-column>
    </el-table>
    <!-- 分页组件 -->
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
                @pagination="getList"
    />

    <!-- 订单详情 -->
    <el-dialog title="订单详情" :visible.sync="openDetail" width="800px" append-to-body>
      <el-form ref="form" :model="form" label-width="100px" size="mini">
        <el-row>
          <el-col :span="30">
            <el-form-item label="品牌：">{{ form.brand }}</el-form-item>
          </el-col>
          <el-col :span="30">
            <el-form-item label="手机型号：">{{ form.model }}</el-form-item>
          </el-col>
          <el-col :span="30">
            <el-form-item label="型号类型：">{{ form.modelType }}</el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="IMEI：">{{ form.imei }}</el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="参数：">{{ form.memory }}，{{ form.colour }}，{{ form.buy }}，{{ form.network }}
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="机况：">{{ form.subrackDesc }}</el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="图片：">
              <ImagePreview  :src="form.reportImg" :multiple="true" :width="100" :height="100" />
              <!-- <imageUpload v-model="form.reportImg"/> -->
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="openDetail = false">关 闭</el-button>
      </div>
    </el-dialog>

    <!--报价详情 -->
    <el-dialog
      class="my_dialog"
      :close-on-click-modal="false"
      :title="'报价详情'"
      :visible.sync="dialogBiddingDetails"
    >
      <el-table
        :data="biddingDetails"
        border
        fit
        highlight-current-row
        style="width: 98%"
      >
        <el-table-column label="渠道用户名称" prop="channelUserName" align="center">
          <template slot-scope="scope">
            <span>{{ scope.row.channelUserName }}</span>
          </template>
        </el-table-column>
        <el-table-column label="渠道原始报价" prop="originalPrice" align="center">
          <template slot-scope="scope">
            <span>{{ scope.row.originalPrice }}</span>
          </template>
        </el-table-column>
        <el-table-column label="渠道最终报价" prop="channelPrice" align="center">
          <template slot-scope="scope">
            <span>{{ scope.row.channelPrice }}</span>
          </template>
        </el-table-column>

        <el-table-column label="额外金额" prop="extraPrice" align="center">
          <template slot-scope="scope">
            <span>{{ scope.row.extraPrice }}</span>
          </template>
        </el-table-column>
        <el-table-column label="店员分润上限" prop="shopUserProfitLimit" align="center">
          <template slot-scope="scope">
            <span>{{ scope.row.shopUserProfitLimit }}</span>
          </template>
        </el-table-column>

        <el-table-column label="平台回收价" prop="reportPrice" align="center">
          <template slot-scope="scope">
            <span>{{ scope.row.reportPrice }}</span>
          </template>
        </el-table-column>
        <el-table-column label="平台分润后金额公式" :show-overflow-tooltip="true" prop="mapChannel" align="center">
          <template slot-scope="scope">
            <span>{{ scope.row.mapChannel }}</span>
          </template>
        </el-table-column>
        <el-table-column label="平台报价公式" :show-overflow-tooltip="true" prop="mapDumpling" align="center">
          <template slot-scope="scope">
            <span>{{ scope.row.mapDumpling }}</span>
          </template>
        </el-table-column>
      </el-table>
      <div style="height: 20px"></div>
    </el-dialog>

    <!-- 对话框(添加 / 修改) -->
    <el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="订单号" prop="reportOrderNo">
          <el-input v-model="form.reportOrderNo" placeholder="请输入订单号"/>
        </el-form-item>
        <el-form-item label="订单状态" prop="reportStatus">
          <el-radio-group v-model="form.reportStatus">
            <el-radio v-for="dict in this.getDictDatas(DICT_TYPE.pc_report_status)"
                      :key="dict.value" :label="parseInt(dict.value)"
            >{{ dict.label }}
            </el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="商户类型" prop="tenantType">
          <el-radio-group v-model="form.tenantType">
            <el-radio v-for="dict in this.getDictDatas(DICT_TYPE.app_tenant_type)"
                      :key="dict.value" :label="parseInt(dict.value)"
            >{{ dict.label }}
            </el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="商户" prop="tenantId">
          <el-input v-model="form.tenantId" placeholder="请输入商户id"/>
        </el-form-item>
        <el-form-item label="分公司" prop="subTenantId">
          <el-input v-model="form.subTenantId" placeholder="请输入分公司id"/>
        </el-form-item>
        <el-form-item label="门店" prop="shopId">
          <el-input v-model="form.shopId" placeholder="请输入门店id"/>
        </el-form-item>
        <el-form-item label="分润" prop="shareBenefit">
          <el-input v-model="form.shareBenefit" placeholder="请输入分润"/>
        </el-form-item>
        <el-form-item label="积分" prop="integral">
          <el-input v-model="form.integral" placeholder="请输入积分"/>
        </el-form-item>
        <el-form-item label="平台回收价" prop="reportPrice">
          <el-input v-model="form.reportPrice" placeholder="请输入平台报价"/>
        </el-form-item>
        <el-form-item label="渠道用户名称 " prop="channelUserId">
          <el-input v-model="form.channelUserId" placeholder="请输入渠道用户名称"/>
        </el-form-item>
        <el-form-item label="渠道最高报价" prop="channelPrice">
          <el-input v-model="form.channelPrice" placeholder="请输入渠道最高报价"/>
        </el-form-item>
        <el-form-item label="竞价状态" prop="channelStatus">
          <el-radio-group v-model="form.channelStatus">
            <el-radio label="1">请选择字典生成</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="员工名称" prop="shopUserId">
          <el-input v-model="form.shopUserId" placeholder="请输入员工名称"/>
        </el-form-item>
        <el-form-item label="订单时间" prop="reportTime">
          <el-date-picker clearable v-model="form.reportTime" type="date" value-format="timestamp"
                          placeholder="选择订单时间"
          />
        </el-form-item>
        <el-form-item label="驳回原因" prop="reject">
          <el-input v-model="form.reject" type="textarea" placeholder="请输入内容"/>
        </el-form-item>
        <el-form-item label="型号类型" prop="modelTypeId">
          <el-input v-model="form.modelTypeId" placeholder="请输入型号类型"/>
        </el-form-item>
        <el-form-item label="内爆" prop="implosionId">
          <el-input v-model="form.implosionId" placeholder="请输入内爆"/>
        </el-form-item>
        <el-form-item label="颜色" prop="colourId">
          <el-input v-model="form.colourId" placeholder="请输入颜色"/>
        </el-form-item>
        <el-form-item label="内存" prop="memoryId">
          <el-input v-model="form.memoryId" placeholder="请输入内存"/>
        </el-form-item>
        <el-form-item label="购买渠道" prop="buyId">
          <el-input v-model="form.buyId" placeholder="请输入购买渠道"/>
        </el-form-item>
        <el-form-item label="网络制式" prop="networkId">
          <el-input v-model="form.networkId" placeholder="请输入网络制式"/>
        </el-form-item>
        <el-form-item label="保修期" prop="warrantyId">
          <el-input v-model="form.warrantyId" placeholder="请输入保修期"/>
        </el-form-item>
        <el-form-item label="ID账号锁" prop="idAccountLockId">
          <el-input v-model="form.idAccountLockId" placeholder="请输入ID账号锁"/>
        </el-form-item>
        <el-form-item label="边框后盖外观" prop="frameId">
          <el-input v-model="form.frameId" placeholder="请输入边框后盖外观"/>
        </el-form-item>
        <el-form-item label="屏幕外观" prop="screenId">
          <el-input v-model="form.screenId" placeholder="请输入屏幕外观"/>
        </el-form-item>
        <el-form-item label="主板情况" prop="mainboardId">
          <el-input v-model="form.mainboardId" placeholder="请输入主板情况"/>
        </el-form-item>
        <el-form-item label="屏幕显示" prop="screenShowId">
          <el-input v-model="form.screenShowId" placeholder="请输入屏幕显示"/>
        </el-form-item>
        <el-form-item label="摄像头" prop="cameraId">
          <el-input v-model="form.cameraId" placeholder="请输入摄像头"/>
        </el-form-item>
        <el-form-item label="开机是否震动" prop="startingUpId">
          <el-input v-model="form.startingUpId" placeholder="请输入开机是否震动"/>
        </el-form-item>
        <el-form-item label="功能性问题" prop="alityId">
          <el-input v-model="form.alityId" placeholder="请输入功能性问题"/>
        </el-form-item>
        <el-form-item label="IMEI" prop="imei">
          <el-input v-model="form.imei" placeholder="请输入IMEI"/>
        </el-form-item>
        <el-form-item label="图片" prop="reportImg">
          <el-input v-model="form.reportImg" placeholder="请输入图片"/>
        </el-form-item>
        <el-form-item label="机况说明" prop="subrackDesc">
          <el-input v-model="form.subrackDesc" placeholder="请输入机况说明"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  createAppReportOrder,
  updateAppReportOrder,
  deleteAppReportOrder,
  getAppReportOrder,
  getAppReportOrderPage,
  exportAppReportOrderExcel, turnDown, consent, getAppBiddingDetails
} from '@/api/pekingfish/appReportOrder'
import { getBusinessList } from '@/api/merchantManagement/business'
import { getBranchCompanyByTenantId } from '@/api/merchantManagement/branchCompany'
import { getStoreBySuTenantId } from '@/api/merchantManagement/store'
import ImageUpload from '@/components/ImageUpload'
import ImagePreview from '@/components/ImagePreview'
import VideoUpload from '@/components/VideoUpload'
import Editor from '@/components/Editor'
import store from '@/store'
import { getNowDateTime } from '@/utils/ruoyi'
import { getUsername } from '@/utils/auth'

export default {
  name: 'AppReportOrder',
  components: {
    VideoUpload, Editor,
    ImageUpload, ImagePreview
  },
  data() {
    return {
      url: process.env.VUE_APP_BASE_API + '/pekingfish/app-report-order/sendOneWebSocket/',
      message: '',
      content: '',
      ws: null,
      tableHeight: document.documentElement.scrollHeight - 245 + 'px',
      // 遮罩层
      loading: true,
      // 导出遮罩层
      exportLoading: false,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 报价单列表
      list: [],
      // 商户名称
      tenants: [],
      // 分公司名称
      subTenants: [],
      //门店名称
      shops: [],
      // 报价详情
      biddingDetails: [],
      // 弹出层标题
      title: '',
      // 是否显示弹出层
      open: false,
      openDetail: false,
      dialogBiddingDetails: false,
      // 查询参数
      queryParams: {
        pageNo: 1,
        pageSize: 10,
        tenantType: null,
        subTenantId: null,
        shopId: null,
        reportPrice: null,
        shopUserId: null,
        channelStatus: null,
        channelUserId: null,
        reportOrderNo: null,
        reportTime: [],
        reportStatus: null,
        createTime: [],
        brandId: null,
        modelId: null,
        modelTypeId: null,
        implosionId: null,
        colourId: null,
        memoryId: null,
        buyId: null,
        networkId: null,
        warrantyId: null,
        idAccountLockId: null,
        frameId: null,
        screenId: null,
        mainboardId: null,
        screenShowId: null,
        cameraId: null,
        startingUpId: null,
        alityId: null,
        imei: null,
        reportImg: null,
        subrackDesc: null
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        channelStatus: [{ required: true, message: '竞价状态', trigger: 'blur' }],
        reportOrderNo: [{ required: true, message: '订单号', trigger: 'blur' }],
        reportStatus: [{ required: true, message: '订单状态', trigger: 'blur' }]
      }
    }
  },
  created() {
    this.url = this.url.replace('http', 'ws')
    this.getList()
    // 商户名称
    getBusinessList().then(response => {
      this.tenants = response.data.list
    })
  },
  mounted() {
    this.t = setInterval(() => {
      this.getList(1)
    }, 60 * 1000)
  },
  destroyed() {
    clearInterval(this.t)
  },
  methods: {
    /** 查询列表 */
    getList() {
      this.loading = true
      // 执行查询
      getAppReportOrderPage(this.queryParams).then(response => {
        this.list = response.data.list
        this.total = response.data.total
        this.loading = false
      })
    },
    chooseTenant(tenantId) {
      console.log(tenantId + '获取的id')
      // 分公司名称
      getBranchCompanyByTenantId(tenantId).then(response => {
        this.subTenants = response.data
      })
    },

    chooseSubTenant(subTenantId) {
      console.log(subTenantId + '获取的id')
      // 门店名称
      getStoreBySuTenantId(subTenantId).then(response => {
        this.shops = response.data
      })
    },
    /** 取消按钮 */
    cancel() {
      this.open = false
      this.reset()
    },
    /** 表单重置 */
    reset() {
      this.form = {
        id: undefined,
        tenantType: undefined,
        tenantId: undefined,
        subTenantId: undefined,
        shopId: undefined,
        shareBenefit: undefined,
        integral: undefined,
        reportPrice: undefined,
        shopUserId: undefined,
        channelPrice: undefined,
        channelStatus: undefined,
        channelUserId: undefined,
        reportOrderNo: undefined,
        reportTime: undefined,
        reportStatus: undefined,
        reject: undefined,
        brandId: undefined,
        modelId: undefined,
        modelTypeId: undefined,
        implosionId: undefined,
        colourId: undefined,
        memoryId: undefined,
        buyId: undefined,
        networkId: undefined,
        warrantyId: undefined,
        idAccountLockId: undefined,
        frameId: undefined,
        screenId: undefined,
        mainboardId: undefined,
        screenShowId: undefined,
        cameraId: undefined,
        startingUpId: undefined,
        alityId: undefined,
        imei: undefined,
        reportImg: undefined,
        subrackDesc: undefined
      }
      this.resetForm('form')
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNo = 1
      this.getList()
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm('queryForm')
      this.handleQuery()
    },
    /** 详细按钮操作 */
    handleView(row) {
      this.openDetail = true
      this.form = row
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset()
      this.open = true
      this.title = '添加报价单'
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset()
      const id = row.id
      getAppReportOrder(id).then(response => {
        this.form = response.data
        this.open = true
        this.title = '修改报价单'
      })
    },
    // 报价详情
    appBiddingDetail(row) {
      const reportOrderNo = row.reportOrderNo
      getAppBiddingDetails(reportOrderNo).then(response => {
        this.biddingDetails = response.data
      })
      this.dialogBiddingDetails = true
    },
    /** 同意按钮操作 */
    handleConsent(row) {
      const reportOrderNo = row.reportOrderNo
      this.$modal.confirm('是否确认同意订单编号为"' + reportOrderNo + '"的数据审核通过?').then(function() {
        return consent(row.id, row.reject)
      }).then(() => {
        this.getList()
        this.$modal.msgSuccess('审核成功')
      }).catch(() => {
      })
    },

    /** 驳回修改按钮操作 */
    handleTurnDown(row) {
      this.$prompt('请输入"' + row.reportOrderNo + '"的驳回原因', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消'
      }).then(({ value }) => {
        turnDown(row.id, value).then(response => {
          this.getList()
          this.$modal.msgSuccess('驳回成功')
        })
      }).catch(() => {
      })
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs['form'].validate(valid => {
        if (!valid) {
          return
        }
        // 修改的提交
        if (this.form.id != null) {
          updateAppReportOrder(this.form).then(response => {
            this.$modal.msgSuccess('修改成功')
            this.open = false
            this.getList()
          })
          return
        }
        // 添加的提交
        createAppReportOrder(this.form).then(response => {
          this.$modal.msgSuccess('新增成功')
          this.open = false
          this.getList()
        })
      })
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const id = row.id
      this.$modal.confirm('是否确认删除报价单编号为"' + id + '"的数据项?').then(function() {
        return deleteAppReportOrder(id)
      }).then(() => {
        this.getList()
        this.$modal.msgSuccess('删除成功')
      }).catch(() => {
      })
    },
    /** 导出按钮操作 */
    handleExport() {
      // 处理查询参数
      let params = { ...this.queryParams }
      params.pageNo = undefined
      params.pageSize = undefined
      this.$modal.confirm('是否确认导出所有报价单数据项?').then(() => {
        this.exportLoading = true
        return exportAppReportOrderExcel(params)
      }).then(response => {
        this.$download.excel(response, '报价单.xls')
        this.exportLoading = false
      }).catch(() => {
      })
    }
  },
}
</script>
